#ifndef CSYSTEMCLASS_H
#define CSYSTEMCLASS_H

#include "InputClass.h"
#include "GraphicsClass.h"
#include "SoundClass.h"
#include "FPSClass.h"
#include "CPUClass.h"
#include "TimerClass.h"
#include "PositionClass.h"

class CSystemClass
{
	LPCWSTR m_ApplicationName;
	HINSTANCE m_hInstance;
	HWND m_hWnd;

	CInputClass* m_pInput;
	CGraphicsClass* m_pGraphics;
	CSoundClass* m_pSound;
	CFPSClass* m_pFPS;
	CCPUClass* m_pCPU;
	CTimerClass* m_pTimer;
	CPositionClass* m_pPosition;

	bool Frame();
	void InitWindows(int& nScreenWidth, int& nScreenHeight);
	void ShutDownWindows();

public:
	CSystemClass(void);
	CSystemClass(const CSystemClass&);
	~CSystemClass(void);

	bool Initialize();
	void Run();
	void ShutDown();
	LRESULT CALLBACK MessageHandler(HWND hWnd, UINT uInt, WPARAM wParam, LPARAM lParam);
};

static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

static CSystemClass* pAppHandle = 0;

#endif